package cn.ham.ms.web;

import cn.ham.ms.entity.User;
import cn.ham.ms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jianghan
 * @date 2018-10-24 13:46
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/user/add")
    public Object add(User user){
        userService.add(user);
        return "success";
    }

    @RequestMapping("/user/getList")
    public Object getList(){
        return userService.getList();
    }
}
